/* Ejercicio 4.27
   ejer4_27.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int side1, side2, hypotenuse;

    for ( side1 = 1; side1 <= 500; side1++ ) {

        for ( side2 = 1; side2 <= 500; side2++ ) {

            for ( hypotenuse = 1; hypotenuse <= 500; hypotenuse++ ) {

                if ( hypotenuse * hypotenuse == side1 * side1 + side2 * side2 ) {
                    printf( "Hypotenuse: %d, side1 %d, side2 %d\n", hypotenuse, side1, side2 );
                }
            }
        }
    }
	return 0;
} /* fin de la funcion main */
